package day3;

import java.util.Scanner;


//字符串中查找最长的数字串
public class oj1 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        String cur = "";
        String ret = "";
        int i = 0;
        for(; i < str.length(); i++) {
            char ch = str.charAt(i);
            if(ch >= '0' && ch <= '9') {
                cur = cur + ch +"";
            } else {
                if(cur.length() > ret.length()) {
                    ret = cur;
                } else {
                    cur = "";
                }
            }
        }
        if(i == str.length() && ret.length() < cur.length()) {
            ret = cur;
        }
        System.out.println(ret);
    }
}
